local tushe = fk.CreateSkill{
    name = "heg__tushe",
}

Fk:loadTranslationTable{
    ["heg__tushe"] = "图射",
    [":heg__tushe"] = "当你使用牌指定其他角色为唯一目标时，你可以摸X张牌（X为大势力的存活角色数）。",

    ["$heg__tushe1"] = "非英杰不图？吾既谋之且射毕！",
    ["$heg__tushe2"] = "汉室衰微，朝纲祸乱，必图后福。",
}

local H = require "packages.ol_hegemony.util"

tushe:addEffect(fk.TargetSpecifying,{
    anim_type = "drawcard",
    can_trigger = function (self, event, target, player, data)
        return target == player and player:hasSkill(tushe.name) and #table.filter(player.room.alive_players, function (p) return H.isBigKingdomPlayer(p)
        end) > 0 and data.to and data.to ~= player and data:isOnlyTarget(data.to)
    end,
    on_use = function (self, event, target, player, data)
        local room = player.room
        local targets = table.filter(room.alive_players, function (p) return H.isBigKingdomPlayer(p) end)
        if #targets == 0 then return end
        player:drawCards(#targets, tushe.name)
    end,
})

return tushe